package cn.lg.soar.common.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 分页
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Getter
@Setter
@ApiModel(value = "分页查询请求", description = "分页查询请求数据模型")
public class PageQuery implements IPageQuery{

    @ApiModelProperty(value = "页码")
    private Integer pageNo;

    @ApiModelProperty(value = "页面大小(返回 list 的最大长度)")
    private Integer pageSize;

    @ApiModelProperty(value = "查询类型（all：查列表和总数(默认)，list：查列表，total：查总数）")
    private QueryType queryType;

    public PageQuery() {
        this.pageNo = 1;
        this.pageSize = 10;
        this.queryType = QueryType.all;
    }

    public PageQuery(Integer pageNo, Integer pageSize) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.queryType = QueryType.all;
    }
}
